Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> def check_tank(pressure, temperature):
    # 假设压力的合格范围是 10-20，温度合格范围是 20-30
    pressure_min = 10
    pressure_max = 20
    temperature_min = 20
    temperature_max = 30

    if pressure_min <= pressure <= pressure_max and temperature_min <= temperature <= temperature_max:
        return True
    else:
        return False

# 测试
pressure_value = float(input("请输入压力值："))
temperature_value = float(input("请输入温度值："))

if check_tank(pressure_value, temperature_value):
    print("压力值和温度值符合要求。")
else:
    print("压力值和温度值不符合要求。")
    
SyntaxError: invalid syntax
>>> 